//
//  HotViewcontroller.m
//  YSBEmployee
//
//  Created by developer on 2021/11/30.
//  Copyright © 2021 ysb. All rights reserved.
//

#import "YSBCommonTool.h"

#import "LHChatVC.h"

#import "YSBGoodOrderViewController.h"



@implementation YSBCommonTool

//Json字符串转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString
{
    if (jsonString == nil) {
        return nil;
    }
    
    NSDictionary *dic = [[NSDictionary alloc] init];
    
    id param = [jsonString mj_JSONObject];
    if ([param isKindOfClass:[NSDictionary class]]) {
        dic = param;
    }
    else{
        NSLog(@"json解析失败：并非字典类型不能转换成字典");
    }
    
    return dic;
}

@end



@implementation LHChatVC

//Json字符串转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString
{
    if (jsonString == nil) {
        return nil;
    }
    
    NSDictionary *dic = [[NSDictionary alloc] init];
    
    id param = [jsonString mj_JSONObject];
    if ([param isKindOfClass:[NSDictionary class]]) {
        dic = param;
    }
    else{
        NSLog(@"json解析失败：并非字典类型不能转换成字典");
    }
    
    return dic;
}


@end


@implementation YSBGoodOrderViewController

//Json字符串转字典
- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString
{
    if (jsonString == nil) {
        return nil;
    }
    
    NSDictionary *dic = [[NSDictionary alloc] init];
    
    id param = [jsonString mj_JSONObject];
    if ([param isKindOfClass:[NSDictionary class]]) {
        dic = param;
    }
    else{
        NSLog(@"json解析失败：并非字典类型不能转换成字典");
    }
    
    return dic;
}


@end


